package utils;

/*
 * Created on 12.01.2006
 */

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

import java.nio.channels.FileChannel;

public class Copy {
	public static void copy(String src_file_name, String dst_file_name) throws IOException {
		FileInputStream src = new FileInputStream(src_file_name);
		FileOutputStream dest = new FileOutputStream(dst_file_name);

		FileChannel srcChannel = src.getChannel();
		FileChannel destChannel = dest.getChannel();

		srcChannel.transferTo(0, srcChannel.size(), destChannel);
		
		src.close();
		dest.close();
	}
}